<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	request.setAttribute("basePath", basePath);
	String respondResultJson= (String)request.getAttribute("respondResultJson");
%>
<html>
<head>
  <base href="<%=basePath%>">
    
    <title>病案系统-数据平台</title>
	<link rel="stylesheet" href="${basePath}assets/bootstrap/css/bootstrap.css"/>
	    
	<link rel="stylesheet" href="${basePath}assets/css/basic.css"/>
	
	<link rel="stylesheet" href="${basePath}assets/css/coding/edit_index_info.css"/>
	<script type="text/javascript" src="${basePath}assets/jquery/jquery.min.js"></script>
	<script type="text/javascript" src="${basePath}assets/bootstrap/js/bootstrap.js"></script>
	
	<script type="text/javascript" src="${basePath}assets/layer/layer.js"></script>
	<script type="text/javascript" src="${basePath}assets/js/coding/edit_index_info.js"></script>
	<script type="text/javascript">
		function loadContent(url) {
			$("#mainContent").attr("src", url);
		}
		$(function(){
			var respondResultJson= <%=respondResultJson%>;
			console.log(respondResultJson);
			if(respondResultJson){
				if(!respondResultJson.success){
					if(respondResultJson.stateCode = "404"){
						layer.msg(respondResultJson.stateMessage);
						
					}
				}else{
					var record = respondResultJson['data'];
					var mrId =record['mr_id'];
					var visitNumber =record['visit_number'];
					var patientName =record['patient_name'];
					var outHospitalDate =record['out_hospital_date'];
					var title="姓名:"+patientName +"&nbsp;&nbsp;&nbsp;病案号:"+mrId+"&nbsp;&nbsp;&nbsp;住院次数:"+visitNumber+"&nbsp;&nbsp;&nbsp;出院日期:"+outHospitalDate;
					
					
					$("#title").html(title);
					$("ul[role='tablist']").removeAttr("hidden");
					$("a[aria-controls='medicalQualityInfo']").click();
				}
			}
		});
	</script>
</head>
<body>
	<div id="div_TC">
		<div class="TC_title">
			<h3 id="title">标题</h3>
	       <%--  <ul style="width:100px;">
	            <li><a onclick="codingFinish('${visitGuid}')">完成编码</a></li>
	        </ul> --%>
		</div>
		<input type="hidden" id ="basePath" value="${basePath }">
		<div class="TC_menu">
			<h3>病案首页附页</h3>
			<ul role="tablist" hidden="hidden">
				<li class="TC_li active"><a onclick="loadContent('${basePath}medical_record_attached_coding/edit_medical_quality_info_form?visitGuid=${visitGuid}')" aria-controls="medicalQualityInfo" role="tab" data-toggle="tab">医疗质量信息</a>
				</li>
				<li class="TC_li"><a onclick="loadContent('${basePath}medical_record_attached_coding/edit_nurse_quality_info_form?visitGuid=${visitGuid}')" aria-controls="nurseQualityInfo" role="tab" data-toggle="tab">护理质量管理信息</a>
				</li>
				<li class="TC_li"><a onclick="loadContent('${basePath}medical_record_attached_coding/edit_hospital_survey_infection_info_form?visitGuid=${visitGuid}')" aria-controls="hospitalSurveyInfectionInfo" role="tab" data-toggle="tab">医院感染调查情况</a>
				</li>
				<li class="TC_li"><a onclick="loadContent('${basePath}medical_record_attached_coding/edit_drgs_manage_info_form?visitGuid=${visitGuid}')" aria-controls="DRGsManageInfo" role="tab" data-toggle="tab">DRGs管理信息</a>
				</li>
				
			</ul>
		</div>
		<div class="content_list">
			<div class="tab-content">
				<div role="tabpanel" class="tab-pane active" id="baseInfo">
					<iframe id="mainContent" style="border: 0px;" width="100%" src="">	
					</iframe>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
